<?php

$trans = array("h" => "-", "hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello", $trans);
//两种行为的模式本质上是不同的:
//1使用三个参数，strtr() 将按字节替换；
//2使用两个参数,即第二给参数是数组这种模式，优先替换更长的子字符串，


echo "\n",strtr("baab", "ab", "01"),"\n";
$trans = array("ab" => "01");
echo strtr("baab", $trans);